//============================================================================
// Name        : fgiproute.h
// Authors     : Luca Fabbrini, Giulio Giovannetti
// Version     : 0.1
// Date        : 17/01/2009
// Copyright   : Copyright (C) 2009 Universita' degli Studi di Firenze
// Licence     : This program is free software; you can redistribute it and/or
//               modify it under the terms of the GNU General Public License
//               as published by the Free Software Foundation; either version 2
//               of the License, or (at your option) any later version.
//
//               This program is distributed in the hope that it will be useful,
//               but WITHOUT ANY WARRANTY; without even the implied warranty of
//               MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//               GNU General Public License for more details.
//
//               You should have received a copy of the GNU General Public License
//               along with this program; if not, write to the Free Software
//               Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// Description : New Route definition for FG MANET routing module.
//============================================================================



#ifndef FGIPROUTE_H_
#define FGIPROUTE_H_



#include <vector>
#include <omnetpp.h>
#include "INETDefs.h"
#include "IPAddress.h"



class FGIPRoute : public IPRoute {
protected:

	double metricT;
	IPAddress sourceAddress;
	int seqNum;//#

	//int rank;

public:
	FGIPRoute() : IPRoute() {}
	virtual ~FGIPRoute() {}
	void setMetricT(double metrict) {metricT = metrict;}
	void setSourceAddress(IPAddress& src) {sourceAddress = src;}
	double getMetricT() {return metricT;}
	int getSeqNum(){return seqNum;}//#
	void setSeqNum(int sn){seqNum = sn;}//#
	IPAddress& getSourceAddress() {return sourceAddress;}

	std::string info() const;
	std::string detailedInfo() const;

	//bool isLessThan(FGIPRoute&);
	bool operator==(const FGIPRoute&);
	bool operator<(FGIPRoute&);
	double qualityOfRoute() const;
};


#endif
